//
//  MLWNetTool.h
//  KITCHEN_STORIES
//
//  Created by dllo on 16/6/6.
//  Copyright © 2016年 MLW. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void(^blockOfSuccess) (id result);
typedef void(^blockOfFailure) (NSError *error);

typedef NS_ENUM(NSUInteger, MLWResponseStyle) {
    MLWJSON,
    MLWDATA,
    MLWXML,
};

typedef NS_ENUM(NSUInteger, MLWRequdstStyle) {
    MLWBodyJSON,
    MLWBodyString,
    
};

@interface MLWNetTool : NSObject

+ (void)GetNetWithUrl:(NSString *)url
                 body:(id)body
               header:(NSDictionary *)headers
             response:(MLWResponseStyle)response
              success:(blockOfSuccess)success
              failure:(blockOfFailure)failure;

+ (void)PostNetWithUrl:(NSString *)url
                  body:(id)body
             bodyStyle:(MLWRequdstStyle)bodyStyle
                header:(NSDictionary *)headers
              response:(MLWResponseStyle)response
               success:(blockOfSuccess)success
               failure:(blockOfFailure)failure;



@end
